package org.wadael.waverobotfrmwrk.meta;

import com.google.wave.api.ProfileServlet;


/**
 * Gives information about your robot.
 * This is just my 2c implementation of the methods defined 
 * by Google Wave Robot API.
 * 
 * @author jerome baton : Wadael, http://blog.wadael.org
 *
 */
@SuppressWarnings("serial")
public class RobotTemplateProfileServlet extends ProfileServlet {

	@Override
	/**
	 * You really should change the value returned here. 
	 * Default is to return the servlet's name (minus servlet)
	 * By overriding.
	 */
	public String getRobotName() {
		// return "Robot";  
		/* Vote Byerley :) */
		return this.getClass().getName().replace("ProfileServlet", "");
	}

	/**
	 * Returns the URL of the application that hosts your robot.
	 * For example  http://contrepwaverobot.appspot.com
	 * 
	 * You MUST override this method to match your own domain.
	 */
	@Override
	public String getRobotProfilePageUrl()
	{
		return "http://YOURDOMAIN.appspot.com";
	}
	
	/**
	 * Returns the URL of the picture used as avatar for your robot.
	 * Default is to use http://YOURDOMAIN.appspot.com/_wave/robot/profile.png
	 * with http://YOURDOMAIN.appspot.com as the value returned by method #getRobotProfilePageUrl() 
	 */
	@Override
	public String getRobotAvatarUrl() {
		// return getRobotProfilePageUrl() + "/_wave/robot/picprofile.png";
		return getRobotProfilePageUrl() + "/_wave/robot/avatar.jpg";
	}
}
